package com.sk.sourcecircle.utils;


import android.app.Activity;

import com.sk.sourcecircle.app.MyApplication;
import com.sk.sourcecircle.callback.HandleDataCallBack;
import com.sk.sourcecircle.common.Constants;

import java.util.LinkedHashMap;

public class AppApi {

    //账号密码登录
    public static void accountLogin(String phone, String password, double lat, double lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("type", 0);
        map.put("phone", phone);
        map.put("password", password);
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.getData(HttpAddress.Login, map, callBack, tag, activity);
    }

    //账号密码登录
    public static void wxLogin(String code, double lat, double lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("code", code);
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.getData(HttpAddress.Wx_Login, map, callBack, tag, activity);
    }

    //发送验证码
    //type	    类型编号 16身份验证 17登录确认 18登录异常 19用户注册 20修改密码 21信息变更
    public static void sendCode(String phone, int type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("phone", phone);
        map.put("type", type);
        HttpUtils.getData(HttpAddress.SendCode, map, callBack, tag, activity);
    }


    //验证码登录
    public static void codeLogin(String phone, String code, double lat, double lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("type", 1);
        map.put("phone", phone);
        map.put("code", code);
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.getData(HttpAddress.Login, map, callBack, tag, activity);
    }


    //注册
    public static void register(String phone, String password, String nickname, String code, double lat, double lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("phone", phone);
        map.put("password", password);
        map.put("nickname", nickname);
        map.put("code", code);
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.getData(HttpAddress.Register, map, callBack, tag, activity);
    }

    //首页tab
    public static void getTabList(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.getData(HttpAddress.GetHomeKind, map, callBack, tag, activity);
    }


    //首页轮播图
    public static void getHomeBanner(String linkage_id, String user_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("linkage_id", linkage_id);
//        if (user_id != null) {
//            map.put("user_id", user_id);
//        }
        HttpUtils.getData(HttpAddress.GetHomeBanner, map, callBack, tag, activity);
    }


    //首页轮播图
    public static void getHomeBanner(String linkage_id, String city_id, String user_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("linkage_id", linkage_id);
        if (user_id != null) {
            map.put("user_id", user_id);
        }
        if (city_id != null) {
            map.put("city_id", city_id);
        }

        HttpUtils.getData(HttpAddress.GetHomeBanner, map, callBack, tag, activity);
    }

    //获取首页推荐活动
    public static void getRecommendEvent(String cate_id, int count, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("cate_id", cate_id);
        map.put("count", count);
        map.put("page", page);
        HttpUtils.getData(HttpAddress.RecommendEvent, map, callBack, tag, activity);
    }

    //获取搜索活动
    public static void searchEvent(String type, String community_id, String seek, int orders, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        if (type != null) {
            map.put("type", type);
        }
        if (community_id != null) {
            map.put("community_id", community_id);
        }
        map.put("seek", seek);
        map.put("orders", orders);
        map.put("page", page);
        HttpUtils.getData(HttpAddress.SearchEvent, map, callBack, tag, activity);
    }

    //根据分类获取社群列表
    public static void getGroupList(String cate_id, float lng, float lat, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        if (cate_id != null && cate_id.length() > 0) {
            map.put("cate_id", cate_id);
        }
        map.put("lat", lat);

        map.put("lng", lng);

//        requestParams.addBodyParameter("lat", "28.67688346261248");
//        requestParams.addBodyParameter("lng", "115.96831569448113");

        map.put("page", page);
        HttpUtils.getData(HttpAddress.GetCateGroup, map, callBack, tag, activity);
    }


    //获取热门搜索
    public static void getHotSearch(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.getData(HttpAddress.GetHotSearch, map, callBack, tag, activity);
    }


    //搜索好友
    public static void searchPep(int page, int per_page, String nickname, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("page", page);
        map.put("per_page", per_page);
        map.put("nickname", nickname);
        HttpUtils.getData(HttpAddress.GetSearchPep, map, callBack, tag, activity);
    }

    //上传相册
    public static void upLoadAlbum(String lat, String lng, String rank, String images, int show_auth, String community_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("lat", lat);
        map.put("lng", lng);
        map.put("rank", rank);
        if (images != null) {
            map.put("images", images);
        }
        map.put("city_id", MyApplication.getInstance().getCityId());
        map.put("show_auth", show_auth);
        map.put("community_id", community_id);
        HttpUtils.postData(HttpAddress.UploadAlbum, map, callBack, tag, activity);
    }

    //我的收藏
    public static void myCollection(int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("page", page);
        HttpUtils.getData(HttpAddress.MyCollection, map, callBack, tag, activity);
    }

    //活动详情
    public static void getEventDetails(int activity_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("activity_id", activity_id);
        HttpUtils.getData(HttpAddress.EventDetails, map, callBack, tag, activity);
    }

    //社群详情
    public static void getGroupDetails(int community_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("community_id", community_id);
        HttpUtils.getData(HttpAddress.GroupDetails, map, callBack, tag, activity);
    }

    //获取附近的圈友
    public static void getRoundFriend(String lat, String lng, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("lat", lat);
        map.put("lng", lng);
        map.put("page", page);
        HttpUtils.getData(HttpAddress.GetRoundFriend, map, callBack, tag, activity);
    }

    //获取我参加的社群
    public static void getJoinedGroup(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.getData(HttpAddress.GetJoinedGroup, map, callBack, tag, activity);
    }

    public static void getJoinedGroup(String lat, String lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.getData(HttpAddress.GetJoinedGroup, map, callBack, tag, activity);
    }

    //意见反馈
//    1闪退问题 2卡顿问题 3程序错误 4功能建议 5死机问题 6其他
    public static void adviceFeedback(String phone, String rank, String image, String type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("phone", phone);
        map.put("rank", rank);
        if (image != null && image.length() > 0) {
            map.put("image", image);
        }
        map.put("type", type);
        HttpUtils.getData(HttpAddress.AdviceFeedback, map, callBack, tag, activity);
    }

    //我的好友
    public static void myFriend(int page, int status, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("page", page);
        map.put("status", status);
        map.put("per_page", Constants.PAGE_NUM);
        HttpUtils.getData(HttpAddress.GetMyFriends, map, callBack, tag, activity);
    }

    public static void myFriend(int page, int status, int type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("page", page);
        map.put("status", status);
        map.put("type", 2);
        map.put("per_page", Constants.PAGE_NUM);
        HttpUtils.getData(HttpAddress.GetMyFriends, map, callBack, tag, activity);
    }

    //个人主页信息
    public static void homePageInfo(int user_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_id", user_id);
        HttpUtils.getData(HttpAddress.HomePageInfo, map, callBack, tag, activity);
    }

    //订单操作接口
    public static void doActionOnOrder(int user_id, int order_id, String type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_id", user_id);
        map.put("order_id", order_id);
        map.put("type", type);
        HttpUtils.getData(HttpAddress.DoActitonOnOrder, map, callBack, tag, activity);
    }

    //社群搜索
    public static void searchGroup(String community_name, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("community_name", community_name);
        map.put("lat", MyApplication.getInstance().getLat());
        map.put("lng", MyApplication.getInstance().getLng());
        HttpUtils.getData(HttpAddress.SearchGroup, map, callBack, tag, activity);
    }

    //关注社群
    public static void addCareGroup(int community_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("community_id", community_id);
        HttpUtils.getData(HttpAddress.AddCareGroup, map, callBack, tag, activity);
    }

    //取消关注社群
    public static void cancelCareGroup(int community_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("community_id", community_id);
        HttpUtils.getData(HttpAddress.CancelCareGroup, map, callBack, tag, activity);
    }

    //获取公告
    public static void getNotice(int page ,String type, String cate_id, String community_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        if (type != null) {
            map.put("type", type);
        }
        if (cate_id != null && cate_id.length() > 0) {
            map.put("cate_id", cate_id);
        }
        if (community_id != null && community_id.length() > 0) {
            map.put("community_id", community_id);
        }
        map.put("page",page);
        HttpUtils.getData(HttpAddress.GetNotice, map, callBack, tag, activity);
    }

    //本地公告
    public static void getLocalConsult(int cate_id, String city_id, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("cate_id", cate_id);
        map.put("city_id", city_id);
        map.put("page", page);
        HttpUtils.getData(HttpAddress.GetNotice, map, callBack, tag, activity);
    }


    //他人主页
    public static void otherPersonInfo(int user_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_id", user_id);
        HttpUtils.getData(HttpAddress.OtherPersonInfo, map, callBack, tag, activity);
    }


    //添加好友
    public static void addFriend(int user_friend_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_friend_id", user_friend_id);
        HttpUtils.postData(HttpAddress.AddFriends, map, callBack, tag, activity);
    }

    //咨询详情
    public static void getNoticeDetails(int article_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("article_id", article_id);
        HttpUtils.getData(HttpAddress.GetNoticeDetails, map, callBack, tag, activity);
    }

    //好友验证接口
    public static void doFriend(int user_id, int status, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_id", user_id);
        map.put("status", status);
        HttpUtils.postData(HttpAddress.DoFriend, map, callBack, tag, activity);
    }

    //本地接口
    public static void getNativeData(int city_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("city_id", city_id);
        HttpUtils.postData(HttpAddress.LocalData, map, callBack, tag, activity);
    }

    public static void myOrderList(int type, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("type", type);
        map.put("page", page);
        HttpUtils.getData(HttpAddress.MyOrderList, map, callBack, tag, activity);
    }

    public static void commentAlbum(int a_id, String content, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("a_id", a_id);
        map.put("content", content);
        HttpUtils.postData(HttpAddress.CommentAblum, map, callBack, tag, activity);
    }

    public static void praiseAlbum(int a_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("a_id", a_id);
        HttpUtils.postData(HttpAddress.AddPraiseAblum, map, callBack, tag, activity);
    }

    public static void collectAlbum(int a_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("a_id", a_id);
        HttpUtils.postData(HttpAddress.CollectAblum, map, callBack, tag, activity);
    }

    //社群相册
    public static void groupAblum(int community_id, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("community_id", community_id);
        map.put("page", page);
        HttpUtils.getData(HttpAddress.GroupAblum, map, callBack, tag, activity);
    }

    //社群活动
    public static void groupEvents(String community_id, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("community_id", community_id);
        map.put("page", page);
        HttpUtils.postData(HttpAddress.GroupEvents, map, callBack, tag, activity);
    }

    public static void changePersonInfo(String address, String intro, int gender, String nickname, String phone, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("address", address);
        map.put("introduce", intro);
        map.put("gender", gender);
        map.put("nickname", nickname);
        map.put("phone", phone);
        HttpUtils.postData(HttpAddress.ChangerInfo, map, callBack, tag, activity);
    }

    public static void roundEvents(String lat, String lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.getData(HttpAddress.RoundEvents, map, callBack, tag, activity);
    }

    public static void roundAblums(String lat, String lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.postData(HttpAddress.RoundEvents, map, callBack, tag, activity);
    }

    public static void localAblums(int city_id, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("city_id", city_id);
        map.put("page", page);
        HttpUtils.postData(HttpAddress.LocalAblums, map, callBack, tag, activity);
    }

    //获取商务合作
    public static void getBussiness(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.postData(HttpAddress.BussinessInfo, map, callBack, tag, activity);
    }

    //添加商务合作
    public static void addBussiness(String name, String need, String phone, String weixin, String qq, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("name", name);
        map.put("need", need);
        map.put("phone", phone);
        map.put("weixin", weixin);
        map.put("qq", qq);
        HttpUtils.postData(HttpAddress.AddBussiness, map, callBack, tag, activity);
    }

    //添加收藏
    public static void addCollect(int id, int type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("id", id);
        map.put("type", type);
        HttpUtils.postData(HttpAddress.AddCollect, map, callBack, tag, activity);
    }

    //取消收藏
    public static void cancelCollect(int id, int type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("id", id);
        map.put("type", type);
        HttpUtils.postData(HttpAddress.CancelCollect, map, callBack, tag, activity);
    }

    //周边资源
    public static void roundSource(double lat, double lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("lat", lat);
        map.put("lng", lng);
//                requestParams.addBodyParameter("lat", "28.67688346261248");
//        requestParams.addBodyParameter("lng", "115.96831569448113");
        HttpUtils.getData(HttpAddress.RoundSource, map, callBack, tag, activity);
    }

    //发表评论

    public static void postComment(String content, String type, int relevance_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("content", content);
        map.put("type", type);
        map.put("relevance_id", relevance_id);
        HttpUtils.postData(HttpAddress.CommentConsult, map, callBack, tag, activity);
    }

    //周边资源更多
    public static void moreRoundSource(double lat, double lng, int type, int page, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("lat", lat);
        map.put("lng", lng);
        map.put("type", type);
        map.put("page", page);
        HttpUtils.getData(HttpAddress.RoundEvents, map, callBack, tag, activity);
    }

    //订单操作
    //REQUEST get user_id order_id type(指定值 confirm[确认] cancel[取消])
    public static void doActionOrder(int user_id, double order_id, int type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_id", user_id);
        map.put("order_id", order_id);
        map.put("type", type);
        HttpUtils.getData(HttpAddress.DoActitonOnOrder, map, callBack, tag, activity);
    }

    //设置添加好友是否需要验证
    public static void settingAddFriend(int user_id, int status, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_id", user_id);
        map.put("status", status);
        HttpUtils.getData(HttpAddress.SettingAddFriend, map, callBack, tag, activity);
    }


    //本地更多任务和活动
    public static void getMoreTask(int type, String city_id, int page, int cate_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("type", type);
        map.put("city_id", city_id);
        map.put("cate_id", cate_id);
        map.put("page", page);
        HttpUtils.getData(HttpAddress.GetTaskAndEvent, map, callBack, tag, activity);
    }

    public static void addOrder(int count, int activity_id, int data_id, int pay_type, String name, String phone, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("count", count);
        map.put("activity_id", activity_id);
        map.put("data_id", data_id);
        map.put("pay_type", pay_type);
        map.put("phone", phone);
        map.put("name", name);
        HttpUtils.getData(HttpAddress.AddOrder, map, callBack, tag, activity);
    }

    public static void getPayParams(int order_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("order_id", order_id);
        HttpUtils.getData(HttpAddress.GetOrderParams, map, callBack, tag, activity);
    }


    public static void getOrderDetails(int order_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("order_id", order_id);
        HttpUtils.getData(HttpAddress.OrderDetails, map, callBack, tag, activity);
    }

    public static void sendTextMessage(int user_id, String content, int type, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_id", user_id);
        map.put("content", content);
        map.put("type", type);
        HttpUtils.getData(HttpAddress.SendTxtMessage, map, callBack, tag, activity);
    }

    public static void getGroupBanner(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.getData(HttpAddress.MyGoupBanner, map, callBack, tag, activity);
    }

    public static void getRoundBanner(double lat, double lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.getData(HttpAddress.RoundBanner, map, callBack, tag, activity);
    }

    public static void getAlpayInfo(int order_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("order_id", order_id);
        HttpUtils.getData(HttpAddress.GetAlPayInfo, map, callBack, tag, activity);
    }

    //微信退款
    public static void wxRefund(int order_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("order_id", order_id);
        HttpUtils.getData(HttpAddress.RefundWx, map, callBack, tag, activity);
    }

    //阿里退款
    public static void alRefund(int order_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("order_id", order_id);
        HttpUtils.getData(HttpAddress.AlPayRefund, map, callBack, tag, activity);
    }

    //社群圈子
    public static void getGroupCircle(int community_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("community_id", community_id);
        HttpUtils.getData(HttpAddress.GetGroupCircle, map, callBack, tag, activity);
    }


    //创建一个任务订单
    public static void createTaskOrder(int activity_id, String phone, String name, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("activity_id", activity_id);
        map.put("phone", phone);
        map.put("name", name);
        HttpUtils.getData(HttpAddress.CreateTaskOrder, map, callBack, tag, activity);
    }


    //设置相册陌生人是否可以查看
    public static void setStrangerIsLook(int user_id, int status, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_id", user_id);
        map.put("status", status);
        HttpUtils.getData(HttpAddress.SetStrangerIsLook, map, callBack, tag, activity);
    }


    //取消订单
    public static void cancelOrder(int user_id, int order_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("user_id", user_id);
        map.put("order_id", order_id);
        map.put("type", "cancel");
        HttpUtils.getData(HttpAddress.CancelOrder, map, callBack, tag, activity);
    }

    //社群的群聊
    public static void groupCircle(int community_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("community_id", community_id);
        HttpUtils.getData(HttpAddress.GroupCirle, map, callBack, tag, activity);
    }

    //申请加入新社群
    public static void applyJoinCircle(int c_id, int user_id, String remarks, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("c_id", c_id);
        map.put("user_id", user_id);
        if (remarks != null) {
            map.put("remarks", remarks);
        }
        HttpUtils.getData(HttpAddress.ApplyJoinCircle, map, callBack, tag, activity);
    }


    //社群的群聊
    public static void vertifyCode(String phone, String code, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("phone", phone);
        map.put("code", code);
        HttpUtils.getData(HttpAddress.VerifyCode, map, callBack, tag, activity);
    }

    //QQ登录
    public static void qqLogin(String openid, String access_token, double lat, double lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("openid", openid);
        map.put("access_token", access_token);
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.getData(HttpAddress.QQLogin, map, callBack, tag, activity);
    }

    //微博登录
    public static void weiboLogin(String access_token, double lat, double lng, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("access_token", access_token);
        map.put("lat", lat);
        map.put("lng", lng);
        HttpUtils.getData(HttpAddress.WeiBoLogin, map, callBack, tag, activity);
    }

    //新手简介
    public static void newIntro(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.getData(HttpAddress.NewPep, map, callBack, tag, activity);
    }

    //新手简介
    public static void myXiaomi(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        HttpUtils.getData(HttpAddress.MyXiaomi, map, callBack, tag, activity);
    }

    //平台公告
    public static void getAppNotice(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        if (MyUtils.getCode(activity) > 0) {
            map.put("user_id", MyUtils.getCode(activity));
        }
        HttpUtils.getData(HttpAddress.GetNoticeApp, map, callBack, tag, activity);
    }

    //相册删除
    public static void deleteAblumn(int album_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("album_id", album_id);
        HttpUtils.getData(HttpAddress.DeleteAblumn, map, callBack, tag, activity);
    }

    //圈子好友
    public static void circleFriends(String c_id, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("c_id", c_id);
        HttpUtils.getData(HttpAddress.CircleFriends, map, callBack, tag, activity);
    }

    //未读消息数量
    public static void unReadCount(HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("type", "circle_friend");
        HttpUtils.getData(HttpAddress.UnreadCount, map, callBack, tag, activity);
    }

    //密码重置
    public static void resetPassword(String password, String confirm_password, String phone, String code, HandleDataCallBack callBack, int tag, Activity activity) {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("password", password);
        map.put("confirm_password", confirm_password);
        map.put("phone", phone);
        map.put("code", code);
        HttpUtils.getData(HttpAddress.ResetPassword, map, callBack, tag, activity);
    }
}
